package com.caih.contacts.service;

import com.caih.contacts.entity.*;
import com.caih.contacts.entity.Result;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public interface EmployessService {

    /**
     *
     * @param employees
     * @return
     */
    public Result<Employees> update(Employees employees);

    /**
     *
     * @param employees
     * @return
     */
    public Result<Employees> save(Employees employees);


    /**
     * 查询所有员工
     * @return
     */
    public Result<List<Employees>> queryAll();

    /**
     * 根据ID 查询员工
     * @param id
     * @return
     */
    public Result<Employees> queryById(String id);

    /**
     *这个有些问题
     * @param name
     * @return
     */
    public Result<Employees> queryByName(String name);

    /**
     *
     * @param mobile
     * @return
     */
    public Result<Employees> queryByMobile(String mobile);


    /**
     *通过userId删除信息并同步到微信上
     * @param id
     * @return
     */
    public Result<String> deleteById(String id);


    /**
     *
     * @param department
     * @return
     */
    public Result<List<Employees>> queryAllByDepartment(Integer department);

    /**
     *
     * @param useridList
     * @return
     */
    public Result<String> batchdelete(List<String> useridList);
}
